<?php
/**
 * Description of _login
 * 
 * @author trongkhoi
 * @since Oct 5, 2013 - 10:21:51 AM
 */
?>
<div class="dropdown-menu dropdown-menu-right signin-form" id="signin_form">
    <div class="row-fluid">
        <div class="span12 register-form-slogan">
            <?php echo Yii::t('frontend', 'SIGN IN!')?>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span5 sign-in-icons">
            <div class="vertical-line"></div>
            <div class="vertical-or"><?php echo Yii::t('frontend', 'OR')?></div>
            <div class="vertical-line second"></div>
            <div class="row-fluid">
                <div class="span12 signup-network">
                    <h5 align="center"><?php echo Yii::t('frontend', 'Signin using one of your networks:')?></h5>
                    <div class="clearfix"></div>
                    <div class="row-fluid">
                        <div class="span12 sigup-block">
                            <?php $this->widget('ext.hoauth.widgets.HOAuth'); ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="span7">
            <div class="row-fluid">
                <?php
                $model = new UserLoginForm;
                $form = $this->beginWidget('CActiveForm', array(
                    'id' => 'login-form',
                    'enableClientValidation' => true,
                    'focus' => array($model, 'email'),
                    'htmlOptions' => array(
                        'onsubmit' => "return false;",
                    ),
                    'action' => NULL
                ));
                ?>
                <?php echo CHtml::hiddenField('ajax', 'login-form'); ?>
                <?php // echo $form->errorSummary($model); ?>
                <div class="span12 signin-wrapper">
                    <div class="clearfix-custom-20"></div>
                    <div class="row-fluid">
                        <div class="span12">
                            <div class="control-group">
                                <?php echo $form->labelEx($model, 'email', array('class' => 'control-label')) ?>
                                <div class="controls">
                                    <?php
                                    echo $form->textField($model, 'email', array(
//                                        'placeholder' => $model->getAttributeLabel('email'),
                                        'class' => 'input-medium span12'))
                                    ?> 
                                    <?php echo $form->error($model, 'email');
                                    ?>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span12">
                            <div class="control-group">
                                <?php echo $form->labelEx($model, 'password', array('class' => 'control-label label-password')) ?>
                                <a href="javascript:void(0)" class="pull-right" id="btn-forgot" onclick="showForgotForm();"><?php echo Yii::t('frontend', 'Forgot Password?') ?></a>
                                <div class="controls">
                                    <?php
                                    echo $form->passwordField($model, 'password', array(
//                                        'placeholder' => $model->getAttributeLabel('password'),
                                        'class' => 'input-medium span12'))
                                    ?>
                                    <?php echo $form->error($model, 'password'); ?> 
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row-fluid" align="right">
                        <div class="span12">
                            <?php
                            echo CHtml::submitButton(Yii::t('frontend', 'Sign In'), array('class' => 'btn btn-signin', 'onclick' => 'login(1);'));
                            ?>
                        </div>
                    </div>
                    <div class="row-fluid" align="right">
                        <div class="span12">
                            <span class="not-a-member"><?php echo Yii::t('frontend', 'Not yet a member?') ?> <a href="javascript:void(0)" onclick="open_signup();"><?php echo Yii::t('frontend', 'Sign up here') ?></a></span>
                        </div>
                    </div>
                </div>
                <?php $this->endWidget(); ?>
            </div>
        </div>
    </div>
</div>
